package com.it.demo;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author げっしょく
 * @date 2021/8/7
 */
public class Demo1 {
    public static void main(String[] args) {
        ExecutorService ex = Executors.newCachedThreadPool();
        Runnable r = new Runnable() {
            @Override
            public void run() {
                System.out.println(Thread.currentThread().getName() + " 正在执行");
            }
        };
        ex.submit(r);
        ex.submit(r);
        ex.submit(r);
        ex.shutdown();
    }
}
